package com.blackitheima2.InnerDemo.test1;

public class TestInner {
    public static void main(String[] args) {
        //创建实现类的对象
        InterImple in=new InterImple();
        in.show();
        in.show1();
        in.show2();
        //单实现匿名内部类
        new Inter(){

            @Override
            public void show() {
                System.out.println("-------");
            }
        }.show();
        //多实现匿名内部类
        Inter1 i=new Inter1(){

            @Override
            public void show() {
                System.out.println("------");
            }

            @Override
            public void show1() {
                System.out.println("----------");
            }

            @Override
            public void show2() {
                System.out.println("------");
            }
        };
        i.show();
        i.show1();
        i.show2();

    }
}
//接口
interface Inter{
    public abstract void show();
}

interface Inter1 extends Inter{
    public abstract void show ();
    public abstract void show1();
    public abstract void show2();
}
//实现类
class InterImple implements Inter,Inter1{

    @Override
    public void show() {
        System.out.println("======");
    }

    @Override
    public void show1() {
        System.out.println("+++++++");
    }

    @Override
    public void show2() {
        System.out.println("&&&&&&&");
    }
}
